using System;
using System.Runtime.Serialization;

namespace InfiniTec.Data
{
    /// <summary>
    /// This exception is thrown when a property is accessed could not be found in 
    /// the underlying <see cref="PropertyCollection"/>
    /// </summary>
    [Serializable]
    public class PropertyNotFoundException : Exception
    {
        /// <summary>
        /// Creates a new instance of this class
        /// </summary>
        public PropertyNotFoundException()
        {
        }

        /// <summary>
        /// Creates a new instance of this class using the specified parameters.
        /// </summary>
        /// <param name="message">The message of the exception</param>
        public PropertyNotFoundException(string message) : base(message)
        {
        }

        /// <summary>
        /// Creates a new instance of this class using the specified parameters.
        /// </summary>
        /// <param name="message">The message of the exception</param>
        /// <param name="inner">The inner excpetion</param>
        public PropertyNotFoundException(string message, Exception inner) : base(message, inner)
        {
        }

        /// <summary>
        /// Creates a new instance of this class using the specified parameters.
        /// </summary>
        /// <param name="context">A <see cref="SerializationInfo"/> instance.</param>
        /// <param name="info">A <see cref="StreamingContext"/> instance</param>
        protected PropertyNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }
}